home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / textual / keychang / !KeyChange / Manual < prev    next >
Text File  |  1992-06-14  |  12KB  |  205 lines

  1.  
  2.                     Manual for the KeyChange module.
  3.                     ================================
  4.                     
  5. The KeyChange module allows the numeric keypad keys to be used as function
  6. keys, and provides a way of generating extra codes from the function keys
  7. for use with "hot-key" utilities. This file describes the facilities
  8. provided in detail. Note that either or both of the "extended keypad" and
  9. "extended function keys" features can be disabled; see the !Help file for
  10. details.
  11.  
  12.   The description given here is rather complex, as there is a fairly large
  13. number of options. The default settings make the keypad keys act as function
  14. keys, which is fairly simple; use for hot-keys either requires a reasonable
  15. understanding of key codes, or an application which lets you set the keys
  16. used just by typing them (but I don't know of any which do this).
  17.  
  18. The Numeric Keypad.
  19. -------------------
  20.  
  21. This has duplicates of the numbers and a few other characters, which makes
  22. entering lists of numbers faster, but is probably not used by most people
  23. for much of the time. If you press the Num Lock key the light goes out, and
  24. you can use some of the keys as duplicate cursor keys, but I doubt that many
  25. people ever use this (or even know about it). The KeyChange module allows
  26. you to use the keypad keys as substitutes for the function keys, and also as
  27. "extended" function keys (described below). When this feature is enabled,
  28. the keys act as follows; the diagram on the left shows the "function key"
  29. mapping, and the one on the right shows those keys which map onto "extended
  30. keys" (keys marked "--" have no equivalent).
  31.  
  32.  
  33.       +------+------+------+------+      +------+------+------+------+
  34.       |      |      |      |      |      |      |      |      |      |
  35.       | N.L. |  F10 |  F11 |  F12 |      | N.L. |  Tab | Copy |  ⇦   |
  36.       |      |      |      |      |      |      |      |      |      |
  37.       +------+------+------+------+      +------+------+------+------+
  38.       |      |      |      |      |      |      |      |      |      |
  39.       |  F7  |  F8  |  F9  |  F13 |      |  --  |  --  |  --  |  ⇨   |
  40.       |      |      |      |      |      |      |      |      |      |
  41.       +------+------+------+------+      +------+------+------+------+
  42.       |      |      |      |      |      |      |      |      |      |
  43.       |  F4  |  F5  |  F6  |  F14 |      |  --  |  --  |  --  |  ⇩   |
  44.       |      |      |      |      |      |      |      |      |      |
  45.       +------+------+------+------+      +------+------+------+------+
  46.       |      |      |      |      |      |      |      |      |      |
  47.       |  F1  |  F2  |  F3  |  E   |      |  --  |  --  |  --  |  E   |
  48.       |      |      |      |  n   |      |      |      |      |  n   |
  49.       +------+------+------+  t   |      +------+------+------+  t   |
  50.       |             |      |  e   |      |             |      |  e   |
  51.       |      F0     |  F15 |  r   |      |      --     |  ⇧   |  r   |
  52.       |             |      |      |      |             |      |      |
  53.       +-------------+------+------+      +-------------+------+------+
  54.  
  55.  
  56. The Enter key is unaltered, but the other keys behave exactly like the
  57. function keys. This includes the generation of extended function key codes,
  58. described below. Note that the Print and Insert keys are "really" F0 and
  59. F13. F14 and F15 don't exist on the standard keyboard; this makes them
  60. the most obvious candidates for "hot keys", as normal applications won't
  61. use them. See the table at the end of this file for the codes to which they
  62. correspond.
  63.  
  64. Keypad modes.
  65. -------------
  66.  
  67. If the extended keypad is enabled, the keypad can be in one of four modes:
  68.   
  69.   1) Normal - gives the symbols printed on the keys.
  70.   2) Num Lock off - this is the state that gives cursor keys etc.
  71.   3) Function keys - as shown above.
  72.   4) Extended function keys - as above, but with F0 to F9 acting as
  73.      extended keys (i.e. swapped between the two tables).
  74.  
  75. The last mode means that you "normally" get the extended keys, but you can
  76. also get the standard function keys by using them with Alt or right-Ctrl as
  77. described below. This makes them more awkward to use as function keys, but
  78. better for hot-key use. Only F0 to F9 are swapped because the other
  79. "extended" keys already exist on the keyboard, whereas F14 and F15 do not.
  80. The modes can be selected as follows:
  81.   
  82.   1) Pressing Num Lock in modes 3 or 4 changes to mode 1; the LED stays lit.
  83.   2) Pressing Num Lock in modes 1 changes to whichever of modes 3 or 4
  84.      was previously used, and in mode 2 to whichever of modes 1, 3 or 4 was
  85.      previously used; the LED stays lit.
  86.   2) Pressing Ctrl-Num Lock (either Ctrl key) in any mode except 2 changes
  87.      to mode 2; the LED goes out. In mode 2 Ctrl is ignored.
  88.   3) Pressing Shift-Num Lock in any mode swaps between modes 3 and 4, and
  89.      changes to whichever of them is then selected; the LED stays lit.
  90.  
  91. A beep is generated whenever the mode changes. This may seem complicated,
  92. but in practice you're only likely to use mode 1 and one of modes 3 or 4,
  93. and you just swap between these by pressing Num Lock. See the !Help file for
  94. how to choose which mode is selected initially, or to change it with a *
  95. command. The default is mode 3.
  96.  
  97.  
  98. Extended function key codes.
  99. ----------------------------
  100.  
  101. There are various so-called hot-key utilities in the public domain, which
  102. allow applications to be launched and other effects triggered by pressing
  103. function keys or control keys. Unfortunately, if you're using a major
  104. application it often intercepts most of these keys, which stops the hot-keys
  105. from working. For example, I'm typing this using DeskEdit, which defines all
  106. but six of the function-key combinations (excluding F12, which is reserved
  107. for RISC OS), as well as most of the control codes. The Wimp system has room
  108. for more codes, but you can't normally type them; this is what KeyChange
  109. does for you.
  110.  
  111.   The simplest way to explain the way things work is that there are
  112. potentially 16 basic function keys, numbered 0 to 15. Everyone knows about
  113. the 12 keys along the top row; there are also Print, which is really F0, and
  114. Insert which is really F13. However, F14 and F15 don't exist. Each of these
  115. keys can be used on its own, with Shift, with Ctrl, and with Shift-Ctrl,
  116. giving 64 potential combinations, of which you can normally type 52.
  117.  
  118.   In addition, there are (again potentially) 16 "extended" function keys,
  119. each of which can again be used with Ctrl and Shift to give another 64
  120. codes. Outside the desktop none of these can be typed with the default
  121. setup, but under the Wimp the Tab key acts as the extended F10, Copy as the
  122. extended F11 and the four cursor keys as the extended F12 to F15. The other
  123. 10 keys (40 combinations) are unavailable.
  124.  
  125.   KeyChange allows you to get the extended F0 to F9 by pressing either one
  126. of the Alt keys, or the right-hand Ctrl key, with the normal F0 to F9. The
  127. reason for these two options is that, as you may know, the Alt keys can
  128. normally be used with various other keys to generate so-called "top-bit-set"
  129. characters; things like currency symbols, greek letters and accented
  130. characters, and also a "hard space". If you want to use this facility you
  131. can't also use the Alt keys to get extended function keys, in which case you
  132. can use the right-hand Ctrl instead. If you don't use the Alt keys like this
  133. you can type "*Unplug InternationalKeyboard" at the command line, and they
  134. will then be available for use with KeyChange; in this case you can continue
  135. to have the two Ctrl keys behaving identically. Note that you should only
  136. have to do this once; the system remembers when a module is *Unplugged
  137. (although some programs may reinstate it).
  138.  
  139.   There is in fact a slight difference (apart from ease of use) between the
  140. two options. The right-hand Ctrl key only modifies F0 to F9, and behaves as
  141. usual with every other key. However, the Alt key also "shifts" the keys F10
  142. to F12, Insert, Tab, Copy and the cursor keys (see the table below). If you
  143. use the keypad to duplicate function keys (as described above), then this
  144. does NOT apply, i.e. the right-hand ctrl modifies all 16 keypad keys just
  145. like Alt.
  146.  
  147. Using the extended codes.
  148. -------------------------
  149.  
  150. In order to make use of the extended codes, you need a hot-key utility which
  151. allows you to define the keys you want to use without making assumptions
  152. about which ones are available. The ideal way of doing this would be to
  153. "teach" it the key you want by pressing it, but I don't personally know of
  154. anything that actually works this way. However, many such applications will
  155. let you specify the keys using key codes (in some cases only by modifying
  156. the program itself). The following table shows the extra codes and which
  157. keys generate them; the codes are given in decimal, with hexadecimal values
  158. in brackets (looking at the hexadecimal codes makes it clearer what's going
  159. on). If you have a copy of the Programmers' Reference Manual, compare this
  160. with the table on page 1198.
  161.  
  162.         Key         Extended key code    Equivalent key       Alt only
  163.         
  164.       Print             448 (&1C0)             -                No
  165.       F1                449 (&1C1)             -                No
  166.       F2                450 (&1C2)             -                No
  167.       F3                451 (&1C3)             -                No
  168.       F4                452 (&1C4)             -                No
  169.       F5                453 (&1C5)             -                No
  170.       F6                454 (&1C6)             -                No
  171.       F7                455 (&1C7)             -                No
  172.       F8                456 (&1C8)             -                No
  173.       F9                457 (&1C9)             -                No
  174.       F10               394 (&18A)            Tab               Yes
  175.       F11               395 (&18B)            Copy              Yes
  176.       F12               396 (&18C)            Cursor left       Yes
  177.       Insert            397 (&18D)            Cursor right      Yes
  178.  
  179.       Tab               458 (&1CA)            F10               Yes
  180.       Copy              459 (&1CB)            F11               Yes
  181.       Cursor left       460 (&1CC)            F12               Yes
  182.       Cursor right      461 (&1CD)            Insert            Yes
  183.       Cursor down       462 (&1CE)                              Yes
  184.       Cursor up         463 (&1CF)                              Yes
  185.  
  186.   Pressing Shift with one of these keys adds 16 (&10) to the code; pressing
  187. Ctrl adds 32 (&20) and pressing Shift and Ctrl adds 48 (&30). [If you're
  188. using the right-hand Ctrl to get the extended codes in the first place, you
  189. need to use the left-hand Ctrl as well to get these.] The "equivalent key"
  190. column shows that some of the "extra" codes you get just duplicate keys that
  191. already exist. The last column shows which codes can only be obtained with
  192. the Alt keys; as you can see, most of these are duplicates anyway. Using the
  193. keypad keys as function keys you can get all 64 "normal" codes and all 64
  194. "extra" codes, using either Alt or right-Ctrl, although you do have to press
  195. four keys together to get 16 of them! You should also note that the Page Up
  196. and Page down keys are identical to Shift plus the cursor up/down keys, and
  197. vice versa.
  198.  
  199.   Outside the Wimp environment the codes you get are 256 (&100) less than
  200. the ones in the table above. To make use of them you need to use OS_Bytes
  201. 221 to 228, described on p. 519-521 of the PRM, but not in the User Guide
  202. (although I think they were in the BBC micro user guide!). They are briefly
  203. mentioned in the original (pre RISC OS) manual, and may be in the new Basic
  204. manual (which I don't have).
  205.